package com.atguigu.lease.common.contest;

public class LoginUserContest {
    private static ThreadLocal<LoginUser> threadLocal=new ThreadLocal<>();
    //保存数据
    public static void setUser(LoginUser loginUser){
        threadLocal.set(loginUser);
    }
    //获取数据
    public  static  LoginUser getUser(){
        return threadLocal.get();

    }
    //删除数据

    public static void removeUser(){
        threadLocal.remove();
    }
}
